<template>
  <div v-for="m in fns" class="wrapper">
    <div class="title">{{ m.title }}</div>
    <template v-if="m.children">
      <!-- menu -->
      <my-menu :fns="m.children"></my-menu>
    </template>
  </div>
</template>

<script setup lang="ts">
import myMenu from './menu.vue'
interface MENU {
  title: string
  children?: MENU[]
}
//  给我一个数据，我来展示
const { fns } = defineProps<{ fns: MENU[] }>()
</script>

<style>
.wrapper {
    margin-left: 10px;
}
</style>
